package com.example.baserecyclerviewadapterdemo.entity.node.section;

import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;
import com.chad.library.adapter.base.entity.node.NodeFooterImp;

import org.jetbrains.annotations.Nullable;

import java.util.List;

public class RootNode extends BaseExpandNode implements NodeFooterImp {
    private List<BaseNode> baseNodes;
    private String title;

    public RootNode(List<BaseNode> baseNodes, String title) {
        this.baseNodes = baseNodes;
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    @Nullable
    @Override
    public List<BaseNode> getChildNode() {
        return baseNodes;
    }

    @Nullable
    @Override
    public BaseNode getFooterNode() {
        return new RootFooterNode("显示更多...");
    }
}
